<template>
    <div>
      <div class="row">
        <div style="flex-shrink: 0;font-size: 14px;">序号：</div><el-input size="mini" style="width: 60px;margin-right: 20px;" v-model="nodeModel.sort"></el-input>
        <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div><el-switch v-model="nodeModel.isShow" :active-value="true" :inactive-value="false" active-color="#13ce66" inactive-color="#999999"></el-switch>
        <div style="margin-left: 20px;">
          <el-button @click="selectTemplate" size="mini">选用模版</el-button>
        </div>
      </div>
      <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;margin-right: 10px;">标题：</div><el-input size="mini" style="width: 120px;margin-right: 20px;"  v-model="nodeModel.title"></el-input>
          <div style="flex-shrink: 0;font-size: 14px;">背景色：</div>
          <el-input size="mini" style="width: 100px;"  v-model="nodeModel.background"></el-input>
          <el-color-picker v-model="nodeModel.background"></el-color-picker>
      </div>
      <div class="column">
          <jcSlider title="上外边距："><el-slider slot="slider" v-model="nodeModel.marginTop" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="下外边距："><el-slider slot="slider" v-model="nodeModel.marginBottom" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="左右外边距："><el-slider slot="slider" v-model="nodeModel.marginLeft" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
      </div>
      <div class="column">
          <jcSlider title="上内边距："><el-slider slot="slider" v-model="nodeModel.paddingTop" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="下内边距："><el-slider slot="slider" v-model="nodeModel.paddingBottom" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="左内边距："><el-slider slot="slider" v-model="nodeModel.paddingLeft" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
      </div>
      <div class="column">
          <jcSlider title="图片宽："><el-slider slot="slider" v-model="nodeModel.widthForCover1" :min="10" :max="750" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="图片高："><el-slider slot="slider" v-model="nodeModel.heightForCover1" :min="10" :max="2000" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="图片圆角："><el-slider slot="slider" v-model="nodeModel.borderRadiusForCover1" :min="0" :max="100" show-input input-size="mini"></el-slider></jcSlider>
      </div>
      <div class="column">
          <jcSlider title="每页滚动时长：" :result="nodeModel.duration"><el-slider slot="slider" v-model="nodeModel.duration" :min="500" :max="5000" show-input input-size="mini"></el-slider></jcSlider>
      </div>
      <!-- 基本信息样式 -->
      <div style="border: 1px solid #eee;margin-top: 10px;padding: 10px 0;padding-right: 10px;">
        <div style="flex-shrink: 0;font-size: 14px;margin-left: 10px;font-size: 16px;font-weight: bold;">基本信息样式：</div>
        <div class="column">
          <div style="flex-shrink: 0;font-size: 14px;">文字区域内边距：</div>
          <div class="column">
            <jcSlider title="上内边距："><el-slider slot="slider" v-model="nodeModel.paddingTopForFlex1" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
            <jcSlider title="下内边距："><el-slider slot="slider" v-model="nodeModel.paddingBottomForFlex1" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
            <jcSlider title="左内边距："><el-slider slot="slider" v-model="nodeModel.paddingLeftForFlex1" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
          </div>
        </div>
        <!-- 标题样式 -->
        <div style="background-color: #eee;width: 600px;height: 1px;margin-left: 20px;margin-top: 10px;"></div>
        <div class="column">
          <div style="flex-shrink: 0;font-size: 14px;font-weight: bold;">标题样式：</div>
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div>
            <el-radio v-model="nodeModel.isShowForText1" :label='true'>是</el-radio>
            <el-radio v-model="nodeModel.isShowForText1" :label='false'>否</el-radio>
          </div>
          <div class="column">
            <jcSlider title="上边距：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.marginTopForText1" :min="0" :max="100" show-input input-size="mini"></el-slider></jcSlider>
            <jcSlider title="字体大小：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.fontsizeForText1" :min="10" :max="100" show-input input-size="mini"></el-slider></jcSlider>
          </div>
          <div class="row" style="margin-left: 20px;">
            <div style="flex-shrink: 0;font-size: 14px;">是否加粗：</div>
            <el-radio v-model="nodeModel.fontweightForText1" label='bold'>是</el-radio>
            <el-radio v-model="nodeModel.fontweightForText1" label=''>否</el-radio>
            <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
            <el-input size="mini" style="width: 100px;"  v-model="nodeModel.colorForText1"></el-input>
            <el-color-picker v-model="nodeModel.colorForText1"></el-color-picker>
          </div>
        </div>
        <!-- 原价样式 -->
        <div style="background-color: #eee;width: 600px;height: 1px;margin-left: 20px;margin-top: 10px;"></div>
        <div class="column">
          <div style="flex-shrink: 0;font-size: 14px;font-weight: bold;">原价样式：</div>
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div>
            <el-radio v-model="nodeModel.isShowForText2" :label='true'>是</el-radio>
            <el-radio v-model="nodeModel.isShowForText2" :label='false'>否</el-radio>
          </div>
          <div class="column">
            <jcSlider title="上边距：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.marginTopForText2" :min="0" :max="100" show-input input-size="mini"></el-slider></jcSlider>
            <jcSlider title="字体大小：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.fontsizeForText2" :min="10" :max="100" show-input input-size="mini"></el-slider></jcSlider>
          </div>
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">是否加粗：</div>
            <el-radio v-model="nodeModel.fontweightForText2" label='bold'>是</el-radio>
            <el-radio v-model="nodeModel.fontweightForText2" label=''>否</el-radio>
            <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
            <el-input size="mini" style="width: 100px;"  v-model="nodeModel.colorForText2"></el-input>
            <el-color-picker v-model="nodeModel.colorForText2"></el-color-picker>
          </div>
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">原价标题：</div>
            <div style="flex-shrink: 0;font-size: 14px;"></div><el-input size="mini" style="width: 100px;margin-right:10px;"  v-model="nodeModel.titleForText2"></el-input>
            <div style="flex-shrink: 0;font-size: 14px;">显示原价删除线：</div>
            <el-radio v-model="nodeModel.deleteLineForText2" label='line-through'>是</el-radio>
            <el-radio v-model="nodeModel.deleteLineForText2" label=''>否</el-radio>
          </div>
        </div>
        <!-- 销售价样式 -->
        <div style="background-color: #eee;width: 600px;height: 1px;margin-left: 20px;margin-top: 10px;"></div>
        <div class="column">
          <div style="flex-shrink: 0;font-size: 14px;font-weight: bold;">销售价样式：</div>
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div>
            <el-radio v-model="nodeModel.isShowForText3" :label='true'>是</el-radio>
            <el-radio v-model="nodeModel.isShowForText3" :label='false'>否</el-radio>
          </div>
          <div class="column">
            <jcSlider title="上边距：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.marginTopForText3" :min="0" :max="100" show-input input-size="mini"></el-slider></jcSlider>
            <jcSlider title="字体大小：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.fontsizeForText3" :min="10" :max="100" show-input input-size="mini"></el-slider></jcSlider>
          </div>
          <div class="row" style="margin-left: 20px;">
            <div style="flex-shrink: 0;font-size: 14px;">是否加粗：</div>
            <el-radio v-model="nodeModel.fontweightForText3" label='bold'>是</el-radio>
            <el-radio v-model="nodeModel.fontweightForText3" label=''>否</el-radio>
            <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
            <el-input size="mini" style="width: 100px;"  v-model="nodeModel.colorForText3"></el-input>
            <el-color-picker v-model="nodeModel.colorForText3"></el-color-picker>
          </div>
        </div>
        <!-- 销量样式 -->
        <div style="background-color: #eee;width: 600px;height: 1px;margin-left: 20px;margin-top: 10px;"></div>
        <div class="column">
          <div style="flex-shrink: 0;font-size: 14px;font-weight: bold;">销量样式：</div>
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div>
            <el-radio v-model="nodeModel.isShowForText4" :label='true'>是</el-radio>
            <el-radio v-model="nodeModel.isShowForText4" :label='false'>否</el-radio>
          </div>
          <div class="column">
            <jcSlider title="字体大小：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.fontsizeForText4" :min="10" :max="100" show-input input-size="mini"></el-slider></jcSlider>
          </div>
          <div class="row" style="margin-left: 20px;">
            <div style="flex-shrink: 0;font-size: 14px;">是否加粗：</div>
            <el-radio v-model="nodeModel.fontweightForText4" label='bold'>是</el-radio>
            <el-radio v-model="nodeModel.fontweightForText4" label=''>否</el-radio>
            <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
            <el-input size="mini" style="width: 100px;"  v-model="nodeModel.colorForText4"></el-input>
            <el-color-picker v-model="nodeModel.colorForText4"></el-color-picker>
          </div>
          <div class="row" style="margin-left: 90px;">
            <div style="flex-shrink: 0;font-size: 14px;">销量标题：</div>
            <div style="flex-shrink: 0;font-size: 14px;"></div><el-input size="mini" style="width: 100px;margin-right:10px;"  v-model="nodeModel.titleForText4"></el-input>
          </div>
        </div>
      </div>
    </div>
</template>

<script>
  import jcSlider from '@/views/interface/composing/components/jc-slider'
  export default {
    components: {
      jcSlider
    },
    props:{
        nodeModel:{
            type: Object,
            default: res=>{}
        }
    },
    data() {
      return {

      }
    },
    methods:{
        selectRoute(item){
            this.$emit('selectRoute', item)
        },
        selectTemplate(){
            this.$emit('selectTemplate')
        },
    }
  }
</script>

<style lang="scss" scoped>
     @import './commonStyle.scss';
</style>